package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Answer;
import cn.wolfcode.trip.base.query.AnswerQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AnswerMapper {
    int deleteByPrimaryKey(Long id);

    int insert(@Param("answer") Answer answer, @Param("questionId") Long questionId);

    Answer selectByPrimaryKey(Long id);

    List<Answer> selectAll();

    int updateByPrimaryKey(Answer record);

    List<Answer> selectAnswerByQueestionId(@Param("qo") AnswerQuery qo, @Param("questionId") Long questionId);

    void updateViewsNums(Long id);
    //统计问答数,现在不做了.就这样吧.
    int countAnswerNums(@Param("questionId") Long questionId);
}